package fan_xing;

import java.awt.List;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class GenericDemo1 {
	public static void main(String[] args) {
		Collection collection=new ArrayList<>();
		collection.add("abc");
		collection.add("itcast");
		collection.add("5");
		Iterator<String> iterator=collection.iterator();
		while(iterator.hasNext()) {
			String string=iterator.next();
			System.out.println(string.length());
		}
	}
}
